net: avoid eth_unregister() call when function is unavailable
authorBernhard Nortmann <[email protected]>
Mon, 14 Sep 2015 13:29:45 +0000 (15:29 +0200)
committerJoe Hershberger <[email protected]>
Wed, 30 Sep 2015 02:54:45 +0000 (21:54 -0500)
commit4917c061a206b1c220307599bbda84b9bc4d44f2
tree0abd8757bb5a848a292df635fff6bfe7dc518431
parentc163e4367908ea625ca962ca6312fc88790b5242
net: avoid eth_unregister() call when function is unavailable

CONFIG_NETCONSOLE causes common/bootm.c to call eth_unregister()
for network device shutdown. However, with CONFIG_DM_ETH this
function is no longer defined.

This is a workaround to avoid the call in that case, and solely
rely on eth_halt(). In case this is insufficient, a proper way
to unregister / remove network devices needs to be implemented.

Signed-off-by: Bernhard Nortmann <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
common/bootm.c